package mianxiangduixiang.Week8.Exam1;


/**
 * @Author JetZhang
 * @Date 2021/11/2
 */
public class Circle extends Point {
    private double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public Circle() {
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double getArea() {
        return 3.14 * radius * radius;
    }

    @Override
    public String toString() {
        return super.toString() + "Circle{" +
                "radius=" + radius +
                '}';
    }

    public Circle(int x, int y, double radius) {
        super(x, y);
        this.radius = radius;
    }
}
